<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5shiv.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="__ADMIN__/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="__ADMIN__/static/h-ui.admin/css/style.css" />
	<link rel="stylesheet" type="text/css" href="__ADMIN__/layui/css/layui.css" />
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/maowenke.css" />
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
	<style>
		.layui-row{
			margin-top: 15px;
		}
	</style>
<![endif]-->
<title></title>
	<script type="text/javascript" charset="utf-8" src="__ADMIN__/fuwenben/ueditor.config.js"></script>
	<script type="text/javascript" charset="utf-8" src="__ADMIN__/fuwenben/ueditor.all.min.js"> </script>
	<!--建议手动加在语言，避免在ie下有时因为加载语言失败导致编辑器加载失败-->
	<!--这里加载的语言文件会覆盖你在配置项目里添加的语言类型，比如你在配置项目里配置的是英文，这里加载的中文，那最后就是中文-->
	<script type="text/javascript" charset="utf-8" src="__ADMIN__/fuwenben/lang/zh-cn/zh-cn.js"></script>

</head>
<body>
<article class="page-container">

		{php}echo $str;{/php}
</article>

<!--_footer 作为公共模版分离出去--> 
<script type="text/javascript" src="__ADMIN__/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="__ADMIN__/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="__ADMIN__/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="__ADMIN__/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="__ADMIN__/lib/jquery.validation/1.14.0/messages_zh.js"></script>
<script src="__ADMIN__/js/jquery.3.3.1.min.js"></script>
<script src="__ADMIN__/layui/layui.all.js"></script>
<script src="__ADMIN__/js/Mao.js"></script>
<!--<script type="text/javascript" src="__STATIC__/admin/lib/ueditor/1.4.3/ueditor.config.js"></script>-->
<!--<script type="text/javascript" src="__STATIC__/admin/lib/ueditor/1.4.3/ueditor.all.min.js"> </script>-->
<!--<script type="text/javascript" src="__STATIC__/admin/lib/ueditor/1.4.3/lang/zh-cn/zh-cn.js"></script>-->
<script type="text/javascript">
    /**
	 * 图片预览
     * @param obj
     */
	function yulan(obj){
	    console.log('haha');
	    var $haha = $(obj).parent().parent().next().children().eq(1);
		Maowenke.ajax($(obj),"/admin/document/upfiles",function (data) {
		    console.log(data);
			var $str = $(obj).prev().val();
			$.each(data,function (i,v) {
			    if($str==' '||$str==''){
			        $str = v.id;
				}else{
                    $str += ','+v.id;
				}
                                        $(obj).prev().val($str);
                        $haha.append('<div style="text-align: center;float: left;margin: 5px"><img src="'+v.dir+'"width="150"/><br><input class="layui-btn layui-btn-xs layui-btn-danger" style="margin-top: 5px" onclick="delimg(this,'+v.id+')" type="button" value="删除"></div>');
            });
        })
	}
	function delimg(obj,$num) {
		$.post("/admin/document/del_img",{id:$num},function (data) {
		    console.log(data);
		    if(data.code==200){
                var $has = $(obj).parent().parent().parent().prev().children().eq(1).children().eq(0);
                var $ha = $has.val();
                $ha = $ha.split(',');
                var $list = [];
                for(a=0;a<$ha.length;a++){
                    if($ha[a]!=$num){
                      $list.push($ha[a]);
					}
				}
				$list = $list.join(',');
                $has.val($list);
                $(obj).parent().remove();
			}else{
		        layer.msg(data.msg);
			}
        })
    }
    function getLinkageSelect(obj,$action) {
	    var $id = $(obj).val();
		$.post($action,{id:$id},function (datas) {
			var $str = '<option value="">请选择</option>';
			if(datas.code==200){
			    $.each(datas.data,function (i,v) {
					$str += '<option value="'+v.id+'">'+v.name+'</option>';
                });
                $(obj).next().next('select').empty();
                $(obj).next().next('select').append($str);
			}else{
			    layer.msg(datas.msg);
			}
        })
    }
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>